﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Demo0520
{
    //减
    class Subtract:Calculate
    {
        public override void DisplayResult(double num1, double num2)
        {
            base.DisplayResult(num1, num2);
            this.num1 = num1;
            this.num2 = num2;
            double sub = 0;
            double sub1 = 0;
            sub = num1 - num2;
            sub1 = num2 - num1;
            Console.WriteLine("{0}-{1}={2}", this.num1, this.num2,sub);
            Console.WriteLine("{0}-{1}={2}", this.num2, this.num1,sub1);
        }
    }
}
